home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-06-22 | 2.5 KB | 129 lines | [TEXT/MPS ] |
- Title 'Kill off stupid assholes who have AppleShare Volumes log in.'
-
- ;_____________________________________________________________________________________
- ;
- ; Unit Kill AppleShare Logins.a
- ;
- ; Use Kills off the AppleShare volumes specified to automatically log in
- ; when the machine is restarted. Make the first INIT in the system folder.
- ;
- ; This INIT works by opening the file 'AppleShare Prep' in the system folder,
- ; and deleting the BMLS resource in the file. This resource is the
- ; means AppleShare uses to store the information about the devices
- ; and usernames to log in at system startup.
- ;
- ; To assemble and link:
- ;
- ; asm "{Target}"
- ; link 'HDisk:Kill AppleShare Logins.a.o' -o 'HDisk: AppleShare Kill' -t INIT -rt INIT ∂
- ; -ra Main=$54
- ; ResEdit
- ;
- ; Created 21 June 1988
- ; Author Bob Hablutzel
- ; John Norstad
- ;
- ; Contact Bob Hablutzel
- ; Northwestern University ACNS Development
- ; 2129 Sheridan Road #130
- ; Evanston, IL 60208
- ; (312) 491-4059
- ;
- ; AppleLink: A0173
- ; BitNet: BOB@NUACC (Prefered)
- ; InterNet: Bob@NUACC.ACNS.NWU.EDU (Just as good)
- ; CompuServe: 76474,154
- ;
- ; Mods None, so far
- ;
- ;_____________________________________________________________________________________
-
- Include 'Traps.a' ; Include trap definitions
- Include 'ToolEqu.a' ; Include Toolbox definitions
-
- PROC
-
- ; Open the resource file.
-
- subq.l #2,sp
- lea theFileName,A0
- move.l A0,D0
- _StripAddress
- move.l D0,-(sp)
- _OpenResFile
- move.w (sp)+,D7
- bmi SysBeep
-
- ; Get the resource of type 'BMLS'
-
- subq.l #4,sp
- move.l #'BMLS',-(sp)
- move.w #2447,-(sp)
- _GetResource
- move.l (sp)+,D5
- beq NewResource
-
- ; If the resource could not be gotten, do not kill it, but rather create it (id = 2447)
- ; so that things will work well in the future.
-
- tst.w ResErr
- bne SysBeep
-
- ; Set the handle size to 2, and clear out the data
-
- UpdateD6:
- move.l D5,A0
- move.l (A0),D0
- beq SysBeep
- _StripAddress
- move.l D0,A0
- clr.w (A0)
- move.l D5,A0
- move.l #2,D0
- _SetHandleSize
- bmi SysBeep
-
- ; Mark the resource as changed
-
- move.l D5,-(sp)
- _ChangedResource
-
- ; Update the resource file
-
- move.w D7,-(sp)
- _UpdateResFile
-
- ; Close the resource file
-
- move.w D7,-(sp)
- _CloseResFIle
-
- ; That's it. Exit
-
- Exit: rts
-
- ; Add a new version of the resource to the resource file
-
- NewResource:
- move.l #2,D0
- _NewHandle ,Clear
- bmi SysBeep
- pea (A0)
- move.l #'BMLS',-(sp)
- move.w #2447,-(sp)
- clr.l -(sp)
- _AddResource
- bra Exit
-
- ; The file did not exist - SysBeep
-
- SysBeep:
- move.w #1,-(sp)
- _SysBeep
- bra Exit
-
- theFileName dc.b 'AppleShare Prep'
-
- Endp
- End
-